package com.example.singing.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 队伍模型类
 */
public class Team implements Serializable {
    private String id;
    private String name;
    private List<String> members;
    private String contactInfo;
    private String competitionId; // 关联的比赛ID
    private String photoPath; // 队伍照片路径

    public Team(String id, String name, List<String> members, String contactInfo) {
        this.id = id;
        this.name = name;
        this.members = members;
        this.contactInfo = contactInfo;
        this.competitionId = null;
        this.photoPath = null;
    }

    // Getters and Setters
    public String getId() { return id; }
    public void setId(String id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public List<String> getMembers() { return members; }
    public void setMembers(List<String> members) { this.members = members; }

    public String getContactInfo() { return contactInfo; }
    public void setContactInfo(String contactInfo) { this.contactInfo = contactInfo; }

    public String getCompetitionId() { return competitionId; }
    public void setCompetitionId(String competitionId) { this.competitionId = competitionId; }

    public String getPhotoPath() { return photoPath; }
    public void setPhotoPath(String photoPath) { this.photoPath = photoPath; }

    @Override
    public String toString() {
        return name + " (" + String.join(", ", members) + ")";
    }
}